package com.yun.zhong.fu.sharecenter.feginclinet;

import com.yun.zhong.fu.sharecenter.domain.UserBonusDto;
import com.yun.zhong.fu.sharecenter.domain.UserDto;
import com.yun.zhong.fu.sharecenter.domain.message.UserAddBonusMsgDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Author RenPu
 * @Date 2020/12/29 13:22
 * @Version 1.0
 * @Description: 用户中心feign接口对外的开放
 * configuration:配置feign的日志参数级别
 **/


@FeignClient(name = "user-center", configuration = {UserCenterFeignConfigration.class})
//@FeignClient(name = "user-center")
public interface UserCenterFeignClinet {

    /**
     * @param id
     * @param ,  @RequestHeader("X-Token") String token
     * @return
     * @RequestHeader("X-Token"):传输token到用户中心
     */
    @GetMapping("/user/{id}")
    public UserDto byIdUser(@PathVariable Integer id);


    @PutMapping("/user/add-bonus")
    public UserDto addBonus(@RequestBody UserBonusDto userBonusDto);


}
